package com.rd.student.jiaji.class4.suyan.zrrd.day14;

import java.util.Calendar;

public class CalendarTest {
    public static void main(String[] args) {
        Calendar calendar=Calendar.getInstance();
        //月份从0开始
        int  month=calendar.get(Calendar.MONTH);
        //12小时和24小时
        int hour =calendar.get(Calendar.HOUR);
        int hour1=calendar.get(Calendar.DAY_OF_MONTH);
        //从周日开始计数
        int dayofweek =calendar.get(calendar.DAY_OF_WEEK);
        int dayofMonth=calendar.get(Calendar.DAY_OF_MONTH);
        int dayofweekInMonth=calendar.get(Calendar.DAY_OF_WEEK_IN_MONTH);
        int dayofYear= calendar.get(Calendar.DAY_OF_YEAR);
        System.out.println(dayofMonth);
        System.out.println(dayofweek);
        System.out.println(dayofYear);
        System.out.println(dayofweekInMonth);
    }
}
